<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%-- 引入页面头 --%>
<%@ include file="/pageHead.jsp"%>
<form name="form1" id="form1" action="<%-- ${systemctx}/sample/saveSample.web --%>" method="post">
	<div class="pageMain">
		<div class="pageTitle">
		<%=MessageResourcesUtils.getMessage(request, "systemmanage.servicemanagement.title") %>
		<span></span>
		<%=MessageResourcesUtils.getMessage(request, "dailyoperation.services.servicesList.title") %>
		<span></span>
		<%=MessageResourcesUtils.getMessage(request, "dailyoperation.services.servicesList.servicechecklist") %>
		</div>
		<div class="pageBody">
			<div class="form-group">
				<ul>
					<li>
						<i></i>
						<label><%=MessageResourcesUtils.getMessage(request, "dailyoperation.services.servicesList.servicename") %></label>
						<span><input type="text" class="input-sm" id="servicename" name="servicename" value="" /></span>
					</li>
				</ul>	
			</div>	
		</div>
		<div class="button-group">
		<input type="button" class="btn btn-default" id="butQuery" name="butQuery" value="<%=MessageResourcesUtils.getMessage(request, "common.button.query") %>" />
		</div>
		<table width="100%">
			<tbody>
				<tr>
					<td>
						<table id="datagrid"></table>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</form>
<script type="text/javascript">
	$(document).ready(
			 
					function() {
						//加载分页控件 datagrid
						$('#datagrid').issdatagrid(
										{
											formid : 'form1',
											title : '<%=MessageResourcesUtils.getMessage(request, "dailyoperation.services.servicesList.servicechecklist") %>',
											width : 'auto',
											nowrap : true,
											autoRowHeight : false,
											singleSelect : true,
											striped : true,
											//collapsible:true,
											url : '${systemctx}/dailyoperation/services/queryServicesCheckListInfoDataGrid.json',
											sortName : 'modifytime',
											sortOrder : 'desc',
											remoteSort : true,
											idField : 'id',
											pagination : true,
											rownumbers : true,
											showFooter : true,
											queryParams:$('#form1').serializeObject(),
											columns : [ [{
												field : 'id',
												title : '<%=MessageResourcesUtils.getMessage(request, "common.button.operation") %>',
												width : 50,
												align : 'center',
												formatter : operate
											},{
												title : '<%=MessageResourcesUtils.getMessage(request, "dailyoperation.services.servicesList.servicenum") %>',
												field : 'servicenum',
												width : 100,
												sortable : true,
												align : 'left',
												formatter: function(value,row,index){
													return "<a href=\"javascript:void(0);\" onclick=\"view('"+row.id+"')\">"+value+"</a>";
												}
											}, {
												title : '<%=MessageResourcesUtils.getMessage(request, "dailyoperation.services.servicesList.servicename") %>',
												field : 'servicename',
												width : 120,
												sortable : true,
												align : 'left'
											}, {
												title : '<%=MessageResourcesUtils.getMessage(request, "dailyoperation.services.storeservicesguajieList.checkstatus") %>',
												field : 'checkstatus',
												width : 100,
												sortable : true,
												align : 'center'
											} ] ],
											onLoadSuccess : function(data) {

											}
										});

						$('#butQuery').click(
								function() {
									$('#datagrid').datagrid('load',
											$('#form1').serializeObject());
						});

						function operate(val, row) {
							return '<a href="javascript:void(0);" class="easyui-linkbutton" onclick="servicesCheck('
									+ val
									+ ')"><%=MessageResourcesUtils.getMessage(request, "common.button.check") %></a>';
						}
					});
	
	//复核页面
	function servicesCheck(val) {
		var id = val;
		$(this).isswindow({
			noheader : true,
			url : '${systemctx}/dailyoperation/services/toServicesCheckView.web?id=' + id
		});
	}
	
	//明细页面
	function view(val) {
		var id = val;
		$(this).isswindow({
			noheader : true,
			url : '${systemctx}/dailyoperation/services/toViewServices.web?id='+id
		});
	}
</script>
<%-- 引入页面尾 --%>
<%@ include file="/pageFloor.jsp"%>